package file;

import java.io.File;
import java.io.IOException;

public class Demo3 {
    public static void main(String[] args) throws IOException {
        File file = new File("./test");
        file.createNewFile();

        // mkdir方法用来创建目录
        boolean result = file.mkdir();
        System.out.println(result);

        // mkdirs方法用来创建多级目录
        File files = new File("./111/222");
        boolean result1 = files.mkdirs();
        System.out.println(result1);
    }
}
